
<clickhouse>
    <http_handlers>
        <rule>
            <methods>GET</methods>
            <headers><XXX>xxx</XXX></headers>
            <url>/test_predefined_handler_get</url>
            <handler>
                <type>predefined_query_handler</type>
                <query>SELECT name, value FROM system.settings WHERE name = {setting_name:String}</query>
            </handler>
        </rule>
        <rule>
            <url><![CDATA[regex:/query_param_with_url/(?P<setting_name_1>[^/]+)]]></url>
            <headers>
                <XXX><![CDATA[regex:(?P<setting_name_2>.+)]]></XXX>
            </headers>
            <handler>
                <type>predefined_query_handler</type>
                <query>SELECT name, value FROM system.settings WHERE name = {setting_name_1:String} OR name = {setting_name_2:String}</query>
                <content_type>application/generic+one</content_type>
            </handler>
        </rule>
        <rule>
            <methods>POST</methods>
            <url>/test_predefined_handler_post_body</url>
            <handler>
                <type>predefined_query_handler</type>
                <query>INSERT INTO test_table(id, data) SELECT {id:UInt32}, {_request_body:String}</query>
            </handler>
        </rule>
    </http_handlers>
</clickhouse>
